package com.youzhi.message.kafka;

import com.youzhi.message.dto.MessageType;

import java.util.HashMap;
import java.util.Map;

public class KafkaMessageHandlerContext {

    public static Map<String, IKafkaMessageHandler> handlerMap;


    static {
        handlerMap = new HashMap<>();
        handlerMap.put(MessageType.kick_off_line.type, new KickOffLineHandler());
        handlerMap.put(MessageType.workflow_assignee_task_notify.type, new WorkflowAssigneeTaskNotifyHandler());
    }

    public static IKafkaMessageHandler select(String messageType) {
        return handlerMap.get(messageType);
    }


}
